package com.mdd.admin.validate.googs;

import com.mdd.admin.validate.goods.OrderGoodsParam;
import com.mdd.common.validator.annotation.IDMust;
import com.mdd.common.validator.annotation.IntegerContains;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import lombok.Data;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 推销员服务参数
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SalesmanGoogsParam implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface create{}
    public interface update{}
    public interface delete{}

    @NotNull(message = "id参数必传且需大于0", groups = {update.class, delete.class})
    @DecimalMin(value = "0", message = "推销员服务id参数值不能少于0", groups = {update.class, delete.class})
    private Long id;

    @NotNull(message = "salesmanId参数缺失", groups = {create.class})
    @DecimalMin(value = "0", message = "salesmanId参数值不能少于0", groups = {create.class, update.class})
    private Long salesmanId;

    @NotNull(message = "productId参数缺失", groups = {create.class})
    @DecimalMin(value = "0", message = "productId参数值不能少于0", groups = {create.class, update.class})
    private Long productId;

    @NotNull(message = "productPrice参数缺失", groups = {create.class, update.class})
    private BigDecimal productPrice;

}
